/**
 * 
 */
package model;

import java.util.Date;

import com.google.android.gms.maps.model.LatLng;

/**
 * @author Claude Michel
 *
 */
public class Event {
private String objectId;
private String title;
private String description;
private String categorie;
private String placeName;
private LatLng position;
private Date startDate; //Includes time includes time in the constructor
private Date endDate; //Includes time in the constructor
private Friend creator;
private boolean isPublic;
public Event(){
}

public Event(String title, String description, String categorie,
		 LatLng position, Date startDate, Date endDate, String placeName,
	Friend creator,boolean isPublic) {
	super();
	this.title = title;
	
	if(description != null || !description.isEmpty()){
		this.description = description;
	}else{
		this.description = "no description";
	}
	
	this.categorie = categorie;
	this.placeName = placeName;
	this.position = position;
	this.startDate = startDate;
	this.endDate = endDate;
	this.creator = creator;
	this.isPublic=isPublic;
}

//public Event(String title, String description, String cat,
//		LatLng location, Date time, Date time2, boolean checked) {
//	super();
//	this.title = title;
//	
//	if(description != null || !description.isEmpty()){
//		this.description = description;
//	}else{
//		this.description = "no description";
//	}
//	
//	this.categorie = cat;	
//	this.position = location;
//	this.startDate = time;
//	this.endDate = time2;	
//	this.isPublic=checked;// TODO Auto-generated constructor stub
//}

public String getTitle() {
	return title;
}
public void setTitle(String title) {
	this.title = title;
}
public String getDescription() {
	return description;
}
public void setDescription(String description) {
	this.description = description;
}
public String getCategorie() {
	return categorie;
}
public void setCategorie(String categorie) {
	this.categorie = categorie;
}
public String getPlace() {
	return placeName;
}

public Friend getCreator() {
	return creator;
}

public void setPlace(String place) {
	this.placeName = place;
}
public Date getStartDate() {
	return startDate;
}
public void setStartDate(Date startDate) {
	this.startDate = startDate;
}
public Date getEndDate() {
	return endDate;
}
public void setEndDate(Date endDate) {
	this.endDate = endDate;
}

public void setCreator(Friend creator){
	this.creator = creator;
}

/* (non-Javadoc)
 * @see java.lang.Object#toString()
 */
@Override
public String toString() {
	return "Event [objectId=" + objectId + ", title=" + title
			+ ", description=" + description + ", categorie=" + categorie
			+ ", placeName=" + placeName + ", position=" + position
			+ ", startDate=" + startDate + ", endDate=" + endDate
		 + ", creator=" + creator + "]";
}

/**
 * @return the placeName
 */
public String getPlaceName() {
	return placeName;
}
/**
 * @param placeName the placeName to set
 */
public void setPlaceName(String placeName) {
	this.placeName = placeName;
}

/**
 * @return the position
 */
public LatLng getPosition() {
	return position;
}
/**
 * @param position the position to set
 */
public void setPosition(LatLng position) {
	this.position = position;
}

/**
 * @return the objectId
 */
public String getObjectId() {
	return this.objectId;
}

/**
 * @param objectId the objectId to set
 */
public void setObjectId(String objectId) {
	this.objectId = objectId;
}

/**
 * @return the isPublic
 */
public boolean isPublic() {
	return isPublic;
}

/**
 * @param isPublic the isPublic to set
 */
public void setPublic(boolean isPublic) {
	this.isPublic = isPublic;
}



}
